#pragma once
interface IImagingFactory;
enum CodecType1 {eDecoder, eEncoder};
class CPixConv
{
public:
	CPixConv(void);
	~CPixConv(void);
public:
	void init();
	long process(PBYTE mtIn,  PBYTE mtOut);
	long decodec(PBYTE mtIn,  PBYTE mtOut,int insize);

public:
	int inWidth;
	int inHeight;
    PixelFormat inPix;

	int outWidth;
	int outHeight;
	PixelFormat outPix;

	struct SwsContext *sws_ctx;

	AVCodecContext* av_context;
	AVCodec *av_codec;

    CodecID codeId;
public:
	//void convertToJpg();
	//BOOL GetCodecCLSID(IImagingFactory* pImagingFactory, CLSID * pclsid, WCHAR * wszMimeType, CodecType1 ctCodec);

};
